/*    */ package cc.s2m.web.s2mBlog.freemarker;
/*    */ 
/*    */ import cc.s2m.web.s2mBlog.service.ITags;
/*    */ import freemarker.template.SimpleNumber;
/*    */ import freemarker.template.TemplateMethodModelEx;
/*    */ import freemarker.template.TemplateModelException;
/*    */ import java.util.HashMap;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ 
/*    */ public class Tags
/*    */   implements TemplateMethodModelEx
/*    */ {
/*    */ 
/*    */   @Autowired
/*    */   private ITags tagsService;
/*    */ 
/*    */   public Object exec(List arguments)
/*    */     throws TemplateModelException
/*    */   {
/* 21 */     if ((arguments == null) || (arguments.size() < 1)) {
/* 22 */       return "";
/*    */     }
/* 24 */     SimpleNumber number = (SimpleNumber)arguments.get(0);
/* 25 */     Map map = new HashMap();
/* 26 */     map.put("orderBy", "number DESC");
/* 27 */     if (number != null) {
/* 28 */       map.put("pageSize", Integer.valueOf(number.getAsNumber().intValue()));
/*    */     }
/* 30 */     List list = this.tagsService.getList(null, map);
/* 31 */     return list;
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\s2mBlog.zip
 * Qualified Name:     s2mBlog-3.0.0.WEB-INF.classes.cc.s2m.web.s2mBlog.freemarker.Tags
 * JD-Core Version:    0.6.1
 */